<?php

/**
 * Description of Array
 *
 * @author tiago
 */
class ZFKiller_Array
{

    /**
     * Soma todos os valores de um array recursivamente
     * @param array $array
     * @return int
     */
    public static function arraySumRecursive($array)
    {
        $total = 0;
        foreach (new recursiveIteratorIterator(new recursiveArrayIterator($array)) as $num) {
            $total += $num;
        }
        return $total;
    }

}
